<!-- 小程序顶部导航栏  -->
<template>
	<view class="topbar" :style="{'background-color':backcolor}">
		<view class="icon arrow" @click="back"></view>
		<view class="">{{title}}</view>
		<view class="icon right-w"></view>
	</view>
</template>

<script>
	export default {
		name:"",
		data() {
			return {
				height:uni.getStorageSync('topHeight')
			}
		},
		props:{
			title:{    //导航名
				type:String,
				default:""
			},
			backcolor:{
				type:String,
				default:"#fff"
			}
		},
		methods: {
			back(){
				this.$emit('back',true)
			},
		}
	}
	
</script>

<style lang="scss" scoped>
	.topbar{
		width: 100%;
		height: 170rpx;
		padding-top: 80rpx;
		text-align: center;
		position: relative;
		display: flex;
		justify-content: space-between;
		align-items: center;
		background-color: #fff;
		color: #000;
		.arrow{
			transform: rotate(-180deg);
			// position: absolute;
			font-size: 40rpx;
			color: #000;
			margin-left: 40rpx;
		}
		.right-w{
			width: 80rpx;
		}
	}
</style>
